this._container = container;
this._children = container.get_children();
this._fadeFactor = params.fadeFactor;
- this._radialEffect = Clutter.feature_available(Clutter.FeatureFlags.SHADERS_GLSL) && params.radialEffect;
+ this._radialEffect = params.radialEffect;
if (this._radialEffect)
this.add_effect(new RadialShaderEffect({ name: 'radial' }));
G_DEFINE_TYPE_WITH_PRIVATE (ShellGLSLEffect, shell_glsl_effect, CLUTTER_TYPE_OFFSCREEN_EFFECT);
-static gboolean
-shell_glsl_effect_pre_paint (ClutterEffect *effect,
- ClutterPaintNode *node,
- ClutterPaintContext *paint_context)
-{
- ClutterEffectClass *parent_class;
-
- if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
- {
- /* if we don't have support for GLSL shaders then we
- * forcibly disable the ActorMeta
- */
- g_warning ("Unable to use the ShaderEffect: the graphics hardware "
- "or the current GL driver does not implement support "
- "for the GLSL shading language.");
- clutter_actor_meta_set_enabled (CLUTTER_ACTOR_META (effect), FALSE);
- return FALSE;
- }
-
- parent_class = CLUTTER_EFFECT_CLASS (shell_glsl_effect_parent_class);
- return parent_class->pre_paint (effect, node, paint_context);
-}
-
static CoglPipeline *
shell_glsl_effect_create_pipeline (ClutterOffscreenEffect *effect,
CoglTexture *texture)
static void
shell_glsl_effect_class_init (ShellGLSLEffectClass *klass)
{
- ClutterEffectClass *effect_class = CLUTTER_EFFECT_CLASS (klass);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterOffscreenEffectClass *offscreen_class;
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
offscreen_class->create_pipeline = shell_glsl_effect_create_pipeline;
- effect_class->pre_paint = shell_glsl_effect_pre_paint;
-
gobject_class->constructed = shell_glsl_effect_constructed;
gobject_class->dispose = shell_glsl_effect_dispose;
}
shell_invert_lightness_effect,
CLUTTER_TYPE_OFFSCREEN_EFFECT);
-static gboolean
-shell_invert_lightness_effect_pre_paint (ClutterEffect *effect,
- ClutterPaintNode *node,
- ClutterPaintContext *paint_context)
-{
- ShellInvertLightnessEffect *self = SHELL_INVERT_LIGHTNESS_EFFECT (effect);
- ClutterEffectClass *parent_class;
-
- if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
- {
- /* if we don't have support for GLSL shaders then we
- * forcibly disable the ActorMeta
- */
- g_warning ("Unable to use the ShellInvertLightnessEffect: the "
- "graphics hardware or the current GL driver does not "
- "implement support for the GLSL shading language.");
- clutter_actor_meta_set_enabled (CLUTTER_ACTOR_META (self), FALSE);
- return FALSE;
- }
-
- parent_class =
- CLUTTER_EFFECT_CLASS (shell_invert_lightness_effect_parent_class);
-
- return parent_class->pre_paint (effect, node, paint_context);
-}
-
static CoglPipeline *
shell_glsl_effect_create_pipeline (ClutterOffscreenEffect *effect,
CoglTexture *texture)
static void
shell_invert_lightness_effect_class_init (ShellInvertLightnessEffectClass *klass)
{
- ClutterEffectClass *effect_class = CLUTTER_EFFECT_CLASS (klass);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterOffscreenEffectClass *offscreen_class;
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
offscreen_class->create_pipeline = shell_glsl_effect_create_pipeline;
- effect_class->pre_paint = shell_invert_lightness_effect_pre_paint;
-
gobject_class->dispose = shell_invert_lightness_effect_dispose;
}
g_return_if_fail (actor == NULL || ST_IS_SCROLL_VIEW (actor));
- if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
- {
- /* if we don't have support for GLSL shaders then we
- * forcibly disable the ActorMeta
- */
- clutter_actor_meta_set_enabled (meta, FALSE);
- return;
- }
-
if (self->vadjustment)
{
g_signal_handlers_disconnect_by_func (self->vadjustment,